package kr.hkit.androidcomplete02.ch17;

import kr.hkit.androidcomplete02.ActivityMain;
import kr.hyunist.androidcomplete01.R;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

public class CallOther extends ActivityMain {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch17_callother);
	}

	public void mOnClick(View v) {
		Intent intent = null;
		switch (v.getId()) {
		case R.id.ch17_webbtn:
			intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://m.naver.com"));
			break;
		case R.id.ch17_dialbtn:
			intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:010-1234-5678"));
			break;
		case R.id.ch17_picturebtn:

			break;
		case R.id.ch17_otherbtn:
			intent = new Intent("kr.hkit.androidcomplete01.ch11.MAIN11");
			//intent = new Intent("ARROWBTN");
			
			/*			
			intent = new Intent();
			intent.setComponent(new ComponentName("kr.hkit.androidcomplete01.chapter11", "kr.hkit.androidcomplete01.MainActivity"));
			intent.setClassName("kr.hkit.androidcomplete01", "kr.hkit.androidcomplete01.MainActivity");
			intent = new Intent("kr.hkit.androidcomplete02.ch17.ADD");
			intent.putExtra("left", 6);
			intent.putExtra("right", 7);*/
			
			break;
		}
		startActivity(intent);
	}
}
